package com.ccx.library.module.parallel.service.Impl;

import com.ccx.library.module.parallel.mapper.UserRoleMapper;
import com.ccx.library.module.parallel.service.UserRoleService;
import com.ccx.library.module.role.entity.Role;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Resource
    private UserRoleMapper userRoleMapper;

    @Override
    public Boolean SaveUR(String userId, String roleId) {
        return userRoleMapper.SaveUR(userId, roleId);
    }

    @Override
    public Role QueryByUsername(String username) {
        return userRoleMapper.QueryByUsername(username);
    }

    @Override
    public List<Role> QueryDownRole(Integer level) {
        return userRoleMapper.QueryDownRole(level);
    }
}
